package factory.headfirst.factorymethod;

import factory.headfirst.Pizza;
import factory.headfirst.factorymethod.pizza.NYStyleCheesePizza;
import factory.headfirst.factorymethod.pizza.NYStyleClamPizza;
import factory.headfirst.factorymethod.pizza.NYStylePepperoniPizza;
import factory.headfirst.factorymethod.pizza.NYStyleVeggiePizza;

public class NYStylePizzaStore extends PizzaStore {

	@Override
	protected Pizza createPizza(String type) {
		Pizza pizza = null;

		if (type.equals("cheese"))
			pizza = new NYStyleCheesePizza();
		if (type.equals("clam"))
			pizza = new NYStyleClamPizza();
		if (type.equals("veggie"))
			pizza = new NYStyleVeggiePizza();
		if (type.equals("pepperoni"))
			pizza = new NYStylePepperoniPizza();

		return pizza;
	}

}
